package project;
/*
*SeatHandler will be used as the GUI and to access the data
*stored in our excel as persistent data
*SeatHandler uses jxl to access the excel files storing
*our data
*/

/*import java.awt.Component;
import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;*/

public class SeatHandler {
	
	int handlerID;
	
	/*JPanel mainPanel;
	JLabel firstClass;
	JLabel businessClass;
	JLabel coachClass;
	JButton submit;
	JLabel map; //find appropriate object type
*/	
	public SeatHandler() {
		/*mainPanel = new JPanel();
		submit = new JButton("Submit");
		firstClass = new JLabel("First Class");
		businessClass = new JLabel("Business Class");
		coachClass = new JLabel("Coach");
		
		setTitle("Airplane");
		setSize(500, 500);
		setLocation(100, 5);
		
		mainPanel.add(firstClass);
		firstClass.setBounds(5, 15, 500, 500);
		mainPanel.add(generateMap("first"));
		
		
		mainPanel.add(businessClass);
		businessClass.setBounds(15, 50, 100, 75);
		mainPanel.add(generateMap("business"));
		
		
		mainPanel.add(coachClass);
		coachClass.setBounds(50, 75, 150, 100);
		mainPanel.add(generateMap("coach"));
		
		mainPanel.add(placeSeat());
		
		submit.setBounds(500, 257, 100, 50);
		mainPanel.add(submit);
		this.add(mainPanel);


		
		setVisible(true);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);*/
	}
	
	
	//generateMap
	/*public JLabel generateMap(String classType){
		map = new JLabel("~~~map~~~");
		return map;
		}*/
		
	

public int decodeRow(char row) {
	
	switch (row) {
	case 'A': return 0;
	case 'B': return 1;
	case 'C': return 2;
	case 'D': return 3;
	case 'E': return 4;
	case 'F': return 5;
	case 'G': return 6;
	case 'H': return 7;
	case 'I': return 8;
	case 'J': return 9;
	default: return 0;
	}
	
}
	
	public int decodeCol(int col) {
		
		col--;
		return col;
			
}
	

	//placeSeat
	/*public Component placeSeat(){
		Rectangle rect = new Rectangle();
		rect.setBounds(150, 20, 40, 40);
		rect.setVisible(true);
	} */
	
	//placeGap
	public void placeGap(){
		
	}

}